<!--
 * @Author: summer12138 1343364145@qq.com
 * @Date: 2023-05-18 19:52:14
 * @LastEditors: summer12138 1343364145@qq.com
 * @LastEditTime: 2023-05-18 20:14:17
 * @FilePath: \Vue核心技术与实战 - 作业\作业\附加1.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <ul>
      <li v-for="(item,index) in arr" :key="item">{{item}}</li>
    </ul>
    <button @click="fn()">走一走</button>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script>
    const vm = new Vue({
      el:'#app',
      data:{
        arr:['帅哥','美女','程序员']
      },
      methods: {
        fn(){
          this.arr.push(this.arr.shift())
        }
      },
    })
  </script>
</body>
</html>